package com.wjk.cms.exception;

public class ApplicationException extends RuntimeException {

    private Integer code;

    public ApplicationException() {
        this(401, null, null);
    }

    public ApplicationException(Integer code) {
        this(code, null, null);
    }

    public ApplicationException(String message) {
        this(401, message, null);
    }

    public ApplicationException(Throwable cause) {
        this(401, null, cause);
    }

    public ApplicationException(Integer code, String message) {
        this(code, message, null);
    }

    public ApplicationException(Integer code, Throwable cause) {
        this(code, null, cause);
    }

    public ApplicationException(String message, Throwable cause) {
        this(401, message, cause);
    }

    public ApplicationException(Integer code, String message, Throwable cause) {
        super(message, cause);
        this.code = code;
    }

    public Integer getCode() {
        return code;
    }

}
